asp:LoginStatus automatically log out after some time
<p>I have <code>asp:LoginStatus</code> on my master page and in my <code>login.aspx.cs</code> file I have logiIn button, which have the selected event handler like.</p>

<pre><code>  protected void btLogIn_Click(object sender, EventArgs e)
    {
        int chk = _dbobj.CheckingIfUserExists(tbUserName_login.Text, tbPassword_login.Text);
        if (chk != 0)
        {
            Response.Cookies["UserName"].Value = tbUserName_login.Text.Trim();
            lbUserNameValidation_logIn.Text = "";
            Response.Redirect("Home.aspx", false);

            if (chbRemember_login.Checked)
            {
                Response.Cookies["UserName"].Expires = DateTime.Now.AddDays(1);
                System.Web.Security.FormsAuthentication.RedirectFromLoginPage(tbUserName_login.Text, true);
            }
            else
            {
                Response.Cookies["UserName"].Expires = DateTime.Now.AddDays(-1);
                System.Web.Security.FormsAuthentication.RedirectFromLoginPage(tbUserName_login.Text, false);
            }

        }
        else
           ............
</code></pre>

<p>When I login without checking remember checkbox, it remembers anyway, and doesn't set loggedout after closing and opening the page.Please help me to solve this..</p>
