public ActionResult LogOff()
 {
     // We need to remove all session variables between this web app and the client
     Session.RemoveAll();
     // ASP.NET stuff that was here to remove user authorization context.
     Microsoft.Owin.IOwinContext ctx = Request.GetOwinContext();
     Microsoft.Owin.Security.IAuthenticationManager authManager = ctx.Authentication;
     authManager.SignOut("ApplicationCookie");
     return(RedirectToAction("index", "Welcome"));
 }
        public ActionResult SuspendAccount()
        {
            ProfileModels profile = profileRepository.Get(User.Identity.GetUserId());

            profile.IsActive = false;
            profileRepository.Edit(profile);
            profileRepository.Save();

            Microsoft.Owin.Security.IAuthenticationManager AuthenticationManager = HttpContext.GetOwinContext().Authentication;
            AuthenticationManager.SignOut();
            return(RedirectToAction("Index", "Home"));
        }