Updated Error handling for failed login, no longer generates a runtime error.