returning 500 status code instead of 401 for failed login