Added a loop for checking the request keys in auth.