fixed some bugs with login
Merge pull request #19 from wchamilton/loginBugfixes

confirmed (Y)