Fixed 500 error when giving incorrect login credentials.