added isAuthenticated() method