It may happen in the machines having latest Nvidia cards to which Ubuntu default repository Nvidia drivers are not compatible, and you might have installed driver from binary file available on Nvidia official site.
When you logout or restart after upgrade system, you get trapped in to login loop. Login window appears but you fail to get in.
Ctrl+ Alt + F1
Login to the terminal on screen
$ sudo /etc/init.d/lightdm stop
go to the folder where you have saved your binary file
$ sudo sh ./NVIDIAfileName.bin --dpkg
Follow the instructions to reinstall it. Restart on completion. You may find that compiz is not working properly. So