Fixes NullPointer on login

Fixed: calling the error callback when the login fails.