Improvements to login stuff.