fixed bug where user hitting the back button breaks login