gnome-session-flashback
After update or something, you will reach login screen. After you enter correctly your passowrd and login, it will enter and inmediatelly return you again in login screen and password screen.
Solution is:
sudo dpkg-reconfigure gdm
for new version
sudo dpkg-reconfigure gdm3
After that enter your password and username and you will see again your desktop.
Solution is from ubuntu