At login, when user is authenticated:
Session["IsLoggedIn"] = "Yes";
Session["LoggedInUserId"] = "User621";
At the time of logout, clear the session:
Session.Clear();
Session["IsLoggedIn"] = null;
If you want to check if user is logged in or not, just see if session value exists. If it's null then not.