Remove dependency on beaker and "null password" failure

After playing around with this for a while, I realized that it was entirely possible for it to fail if you simply entered no password whatsoever.

Also, there was an apparent indentation error in login().

This appears to work for me at present (with unencrypted cookies), but I will be testing it further and sending another pull request if necessary.