Try:
protected void butLogInOut_Click(object sender, EventArgs e)
{
if (User != null)
{
FormsAuthentication.SignOut();
Session["UserId"] = null;
Response.Redirect(@"~\Default.aspx", true);
return;
}
Response.Redirect(@"~\Login.aspx", true);
}
Or (crude, but it will work):
Session.Abandon();
Response.Redirect("~/Default.aspx");