First you need to handle
Session_Start & Session_End in
Global.asax. Have a variable in Session like below. Sorry the code was in VB, you can easily convert this into C#.
Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs)
Session("UserLogged") = False
End Sub
Sub Session_End(ByVal sender As Object, ByVal e As EventArgs)
Session("UserLogged") = False
End Sub
Then write your code to check
Session("UserLogged") whenever an action is performed. Based on the value, redirect to Login page.