fix AttributeError
Merge pull request #2424 from gittip/fix-login

Fix login