Login error handling and a few small js things.