Scrivito.ensureUserIsLoggedIn
determines if the user is logged in. If this is not the case, it automatically redirects the browser to the log-in page of IAM or the custom identity provider. If the user is already logged in, nothing happens.
A website offering visitors to optionally log in would trigger this API method via a login button.