[Fix bug 1038055] Fix authentication login_failure() definition.

* Implement error handling.
* Fix login_failure() TypeError triggered by BrowserIDException on BrowserID post().
Merge pull request #1035 from johngian/fix-1038055

[Fix bug 1038055] Fix authentication login_failure() definition.