Implement server-side login tokens.

Adds server-side login tokens that ensure users are completely logged out when they click the logout button. 

This should be pulled up into master at some point as well.