title: asp.net MVC 4. Log out functionality not working
body: <p>I have this html in my asp.net MVC 4 application:</p>
  
  <pre><code> @if (User.Identity.IsAuthenticated)
                   &lt;li class="login-link"&gt;     {
    @Html.ActionLink(User.Identity.Name, "LogOff", "Account")
   &lt;/li&gt;
  }
  </code></pre>
  
  <p>and this controller action</p>
  
  <pre><code>//[HttpPost]
  //[ValidateAntiForgeryToken]
  public ActionResult LogOff()
  {
      WebSecurity.Logout();
  
      return RedirectToAction("Index", "Home");
  }
  </code></pre>
  
  <p>but when i click log out link, user doesnt log out. </p>
  
  <p>Please suggest how to fix it</p>