Correctly handle error cases.
Merge branch 'master' of github.com:Transformapp/webapp into login