title: Mvc Authorize attribute is not working
body: <p>I have created <code>HomeController</code> decorated with <code>AuthorizeAttribute</code>, and also created <code>AccountController</code>, but it is not redirecting to the <code>Login()</code> action of <code>AccountController</code>.</p>
  
  <p>Home controller:</p>
  
  <pre><code>[Authorize]
  public class HomeController : Controller
  {
      public ActionResult Index()
      {
          return View();
      }
  }
  </code></pre>
  
  <p>Account controller:</p>
  
  <pre><code>public class AccountController : Controller
  {
      [HttpGet]
      public ActionResult Login()
      {
          return View();
      }
  
      [HttpPost]
      public ActionResult Login(LogOnCustom log)
      {
          if(ModelState.IsValid)
          {
              if(Membership.ValidateUser(log.UserName,log.Password))
              {
                  FormsAuthentication.RedirectFromLoginPage(log.UserName, log.Isremeber);
              }
              else
              {
                  ModelState.AddModelError("", "logOn error");
              }
          }
          return View(log);
      }
  }
  </code></pre>
  
  <p>web.config:</p>
  
  <pre><code>&lt;authentication mode="Forms"&gt;
      &lt;forms loginUrl="~/Account/Login" timeout="2880" &gt;
      &lt;/forms&gt;
  &lt;/authentication&gt;
  </code></pre>