refresh token automatically before expiration