/// <summary> /// The user wishes to logout /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnLogout_Click(object sender, EventArgs e) { //nullify the session and page object member = (Member)Session["Member"]; if (member != null) { try { MemberSettings ms = member.MemberSettings[0]; ms.AutoLoadChatMode = -1; ms.Save(); } catch { } try { UserStatus.RemoveUser(member.WebMemberID); //Next2Friends.ChatClient.ChatLogic.LogoutOfChatServer(member.WebMemberID); } catch { } } Session["Member"] = null; member = null; Response.Cookies["LastActivity"].Value = null; Response.Cookies["LastActivity"].Expires = System.DateTime.Now.AddMonths(-1); Response.Redirect("/breakout.aspx"); }