I had the same problem and found a thread elsewhere that solved the problem in a different way.
创新互联专业为企业提供榆林网站建设、榆林做网站、榆林网站设计、榆林网站制作等企业网站建设、网页设计与制作、榆林企业网站模板建站服务,十载榆林做网站经验,不只是建网站,更提供有价值的思路和整体网络服务。As above, at the login screen use Cntrl+Alt+F1 to open a terminal window and login at the command line instead
by default you should be in your home directory,
use the command ‘pwd’ to show what directory you are in, in my case…
pwd
/home/peter
if you are not in your home directory change to it using
cd /home/’username’
here you need to remove two files (note the ‘.’ prefix on both) .Xauthority and .ICEauthority
to show the files type the commands
ls .Xauthority -hal
ls .ICEauthority -hal
Assuming they are there the command to remove them is…
rm .Xauthority .ICEauthority
then reboot the machine using
sudo shutdown -r now
After reboot I was able to login as normal
http://czmmiao.iteye.com/blog/1003810
chown $USER:$USER -R /home/$USER/
chmod 644 /home/$USER/.ICEauthority