title: Why is User.Identity null after Membership.ValidateUser returns true?
body: <p>It is unfortunate I have to deal with <code>MembershipProvider</code> in the days of MVC5. But here is the problem that confuses me.</p>
  
  <p>In my MVC application, the login view post the username and password back to the Login controller.</p>
  
  <pre><code>    [HttpPost]
      public ActionResult Login(LoginInputModel model)
      {   
          var isValid = Membership.ValidateUser(model.Username, model.Password);
          var user = Membership.GetUser(model.Username);
          var isAuthenticated = User.Identity.IsAuthenticated;
          var username = User.Identity.Name;
          ...
      }
  </code></pre>
  
  <p>Step into the controller, I find</p>
  
  <ul>
  <li><code>isValid</code> is <code>true</code>, which is good.</li>
  <li><code>user</code> returns correct information also.</li>
  </ul>
  
  <p>But </p>
  
  <ul>
  <li><code>isAuthenticated</code> is <code>false</code></li>
  <li><code>User.Identity</code> is still <code>null</code>.</li>
  </ul>
  
  <p>I always thought <code>Membership.ValidateUser()</code> will populated User.Identity` with correct info. Now it appears there is something missing. Can anyone tell me what went wrong?</p>
  
  <p>Thanks.</p>