in the page load event write following code
protected void Page_Load(object sender, EventArgs e)
{
if (Session["loginstatus"].ToString() == "")
{
Response.Redirect("Login.aspx");
}
}
and write following code in logout button click event
protected void LinkButton1_Click(object sender, EventArgs e)
{
Session.Abandon();
Session.Clear();
Response.Redirect("Login.aspx");
}
then at the time of login set
Session["loginStatus"] = "ok";