Improved handling of OAuth token expiration.