In my login pages, I generally add a session state variable. When the session times out, this variable will no longer exist. I call this method the Page_Load from all the pages in my last web app. You don't need it to do it in a static method, though, but I thought it might illustrate the necessary objects for you.
public static void checklogin(HttpSessionState s,Page r)
{
if (s["FullName"]==null)
{
s.Add("SessionExpired","true");
r.Response.Redirect("login.aspx");
}
}