added error handling for auth timeout and access denied