Added isAuthenticated method