Fix Bug 907304 - Prevent crash when errors were caught from login api

https://bugzilla.mozilla.org/show_bug.cgi?id=907304