The following algorithm uses the cached credentials for the first login attempt. If the login fails the A2A client cache is overridden, credentials are retrieved .