How to resolve Login Loop in Ubuntu ?

Are you again and again in to login screen ? yes ! you are looped - In other words your system lost PATH so its redirecting you again and again in to the login screen.
Press CTRL + ALT + F1 which open’s shell for you
login with your system name and password
Try some basic commands like cd ,ls ect .. to ensure your system lost path
Command 'ls' is available in '/bin/ls'
The command could not be located because '/bin' is not included in the PATH environment variable.
ls: command not foundare you getting this ? Yes ! you have lost your system path
Type ‘echo $PATH’ in your shell to check your current Path
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
If your shell is not returning something like this
type below in the shell and press enter
export PATH="$PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:
/sbin:/bin:/usr/games:/usr/local/games:/snap/bin"
and now ALT + F7 and try to login
if still not login again login in to shell and check ./profile and ./bashrc file whether you have added any code while trying to install something if there is any remove it.
and also try this in your shell
mv .Xauthority .Xauthoritybackup
And sudo service restart your lightdm