Implemented retries when trying to obtain a new token