Ubuntu loop login problem solution: (for loop login caused by graphics card driver problems)
ctrl+alt+f1 #Switch to command line
sudo service lightdm stop #Close the graphical interface
sudo apt-get --purge remove nvidia-* #Uninstall the driver
sudo apt-get install nvidia-375 #Reinstall the graphics card driver, and tab completes the full name of the graphics card in your computer
sudo service lightdm start #Open the graphical interface
perfect problem solving