Better error pages in the login flow
kill magic numbers, add better comments, and TODO for later PR
rename function to denote it's use
Merge pull request #70 from danrschlosser/better_login_flow

Better error pages in the login flow