Moved isAuthenticated function to account module