esult = await frui.getSession();

      if (result.type === 'LoginSuccess') {
        target.innerHTML = `Success:<br/>${result.getSessionToken()}<br/><br/>Logging out in 3 seconds...`;
        setTimeout(async () => {
          await forgerock.SessionManager.logout();
          window.location.reload(true);
        }, 3000);
      } else {
        target.innerHTML = `Failure: ${result.getMessage()}`;
      }
    }

    window.addEventListener('load', login);
  </script>
</body>
</html>
