Ugly hack for keeping the user logged in.