Authenticate and refresh tokens