How do I properly check for this event in my code?
I need it to fire off each time the user logs in and out…

I did this but it does not work,I get an error:

var loggedIn = Account.loggedInChanged();
if (loggedIn) {
    print("loggedIN: ");
} else {
    print("not LoggedIN: ");


Account.loggedIn is a read-only JavaScript property that tells you whether you’re logged in or not.

Account.loggedInChanged is a signal which tells you when the Account.loggedIn value has changed…

Account.loggedInChanged.connect(function (loggedIn) {
    print("Logged in: " + loggedIn);
    print("Logged in: " + Account.loggedIn);  // Should be the same as previous line.


Awesome. Thank you for explaining that. Make more sense now :blush: