adding validation check to verify_credentials - checks for successful response