How is the window.isCustomerLoggedIn implemented and used?

See also: