Attempt 1 of keeping user logged in...

That and some other fun changes.