Listen to this event to determine when a user has logged in or out
Example:
window.addEventListener("supercast-login-state-changed", function(event) {
if (event.detail == null) {
console.log("User is logged out.");
} else {
console.log("User is logged in", event.detail);
}
});
Returns:
A promise that resolves to an object containing information about the current user.