I have a Mac Mini, late 2011, with Mac OS X Lion on it. Today I rebooted my machine and after that, the Mac couldn't load the GUI anymore and continuously tried to load the logon screen.
The OS worked,
sshd worked, VNC and Samba shares worked, but I didn't get a GUI.
I ran Recovery with Command key and made a HDD and memory test. I also repaired permissions and the hard drive.