title: unable to modify MVC 4 bult-in login controller
body: <p>I'm using the mvc4 application built-in account registration and login controllers(and their respective models). I've my own method for deleting accounts. So I want to put a check in the standard login controller, so that it checks if I've deleted the account myself and then redirect the person to an informative page.</p>
  
  <p>However, when the controller gets called it just passes my line of code and still logs the user in. I've checked the DB. The user has 0  set to its IsActive(that lists accounts as "active" and "inactive") value and should get redirected. But he just logs in like my line of code doesn't exist... </p>
  
  <p>This is the code in the controller:</p>
  
  <pre><code>[HttpPost]
  [AllowAnonymous]
  [ValidateAntiForgeryToken]
  public ActionResult Login(LoginModel model, string returnUrl)
  {
   if (WorkerDAL.IsActive(model.UserName)) RedirectToAction("DisplayDeletedUserMessage", "Home");    //my redirect code
  
   if (ModelState.IsValid &amp;&amp; WebSecurity.Login(model.UserName, model.Password, persistCookie: model.RememberMe))
           {
                      return RedirectToLocal(returnUrl);
           }
  
       // If we got this far, something failed, redisplay form
   ModelState.AddModelError("", "The user name or password provided is incorrect.");
   return View(model);
  }
  </code></pre>
  
  <p>The code from my DAL class:</p>
  
  <pre><code>public static bool IsActive(string _username)
  {  TimeTrackerEntities db = new TimeTrackerEntities();
     foreach (Worker worker in db.Workers)
     {
         if (worker.UserName == _username)
         {
               if (worker.IsActive == 1) return true;
               if (worker.IsActive == 0) return false;
         }
     }
  return true;
  }
  </code></pre>
  
  <p>Am I using the wrong action to user for my redirect? Or something obvious like that? I'm basically lost...</p>
  
  <p>edit - Thanks to Eric J. and Jonathon Page the code is now working. Thank you both! 
  How can I note both of their comments as the correct answer?</p>