Global isLogged function