Fix issue #39. Make sure that the password is checked first. Also while
I'm at it, some general cleanup on the login code.
Merge branch 'master' of https://github.com/enwikipedia-acc/waca.git