public ActionResult Logout()
        {
            string redirectUrl = Request["redir"];
            CMSPageRedirectRequest redirectContext = _Authman.LogOut(Request.RequestContext.HttpContext, redirectUrl);

            performRedirection(redirectContext);
            return(null);
        }
 private void performRedirection(CMSPageRedirectRequest redirectContext)
 {
     if (redirectContext != null)
     {
         string absoluteUrl = redirectContext.FinalUrl;
         if (!absoluteUrl.StartsWith("http://") && !absoluteUrl.StartsWith("https://"))
         {
             absoluteUrl = VirtualPathUtility.ToAbsolute("~/" + absoluteUrl.TrimStart('/'));
         }
         Response.Redirect(absoluteUrl);
     }
 }