Auto redirect to login after session timeout
===

I am trying to redirect automatically to my login page after session times out.
I tried to add this code in my Main.Master page (all the other pages are connected to this master page):

    protected void Page_Load(object sender, EventArgs e)
    {
                //Redirects to Login Page 3 seconds before session timeout
                Response.AppendHeader("Redirect", Convert.ToString((Session.Timeout * 60) - 3) + "; URL=~/Login.aspx");
    }

I configured the session timeout to 1 minute in my web config:

    <sessionState mode="InProc" cookieless="false" timeout="1"/>

but nothing happened...

Can anyone help me find the problem with this code, or has other ideas how to make it work?

Thanks, Inbal.