Logging out whenever your interface dies
This used to happen to me quite a lot under 10.10 for various reasons, (mostly playing around with things I shouldn't), but I found a good way of getting back to the login screen.
Press Crtl+Alt+F1, which will take you to one of the background virtual terminals. (If you ever want to come back because you're just testing it press Ctrl+Alt+F7 or Ctrl+Alt+F8, one of which should take you back to the graphical interface.
In the fullscreen terminal, you'll be asked to log in. Log in using your normal username and pass word, and type
sudo killall Xorg, which (after entering your password again), will kill Xorg and force it to restart back to the login screen.
When it restarts, it will show your user with a tick next to their name and say already logged in, don't worry about that, its referring to the virtual terminal that you just logged in to. You can switch back to it using Crtl+Alt+F1 as above to see it running, and you can log out of the terminal just by typing
Hope that helps.