Show login errors

Present informative notifications for various kinds of login failures, including the 418 "teapot" exception.

Also, this adds polyfills for cordova navigator.notification.alert() and .confirm(), easy to remove if we decide to go with something more comprehensive.