If entering a password into display manager like gdm or lightdm and desktop is not loaded, but you get redirected back to login screen, delete file .Xauthority in .