add timelimit's to curl calls and handle unauthorized access as a retry event