catch TypeError
add redirect to original page on login
Merge branch 'master' into leaderboard