Stucked in your desktop/laptop ubuntu’s login screen means , you enter your password then screen goes black then login screen appears again and again in loop , here are three easy troubleshooting methods you can follow to resolve your problem.
$ cat ~/.xsession-errors
now see and identify what is causing the problem .
Login in console mode using
ctrl + alt + f1 or
ctrl + alt + f2 then
$ chown $USER:$USER .Xauthority
if it doesn’t work try renaming .
$ mv .Xauthority .Xauthority.bak
ctrl + alt + f7 to go back to login screen , if these all solution doesn’t work , then uninstall and install again
# For re-configuring $ sudo dpkg-reconfigure lightdm
$ sudo apt-get purge lightdm && sudo apt-get install lightdm
gdm in place of
$ sudo apt-get purge lightdm && sudo apt-get install gdm
I hope it was helpful for you , thanks for reading .