added 401 status code when authenticat fails due to invalid credentials