How to get user is logged in or not
To understand the user is logged in or not, We can use User.Identity.IsAuthenticated, it returns the true or false