Created isLoggedIn() method to tune up access to DOM when building snippets