Regarding amazon-connect-streams ccp softphone

how can we stop initialize below code many times after succesffully logged in via help of javascript?

      connect.core.initCCP(containerDiv, {
      ccpUrl: instanceURL,            // REQUIRED
      loginPopup: true,               // optional, defaults to `true`
      region: "eu-central-1",         // REQUIRED for `CHAT`, optional otherwise
      softphone: {                    // optional, defaults below apply if not provided
        allowFramedSoftphone: true,   // optional, defaults to false
      }

need quick help on this.!