better error handling messages / prevention from null context during login