Q:

User.Identity.IsAuthenticated returns false after SignInAsync invoked

I have a pop up form in that form I load my Login view using jquery UI dialog .When the Login button is clicked I invoke the Account/Login action using ajax post .Here is my code :
[HttpPost]
[AllowAnonymous]
[ValidateAntiForgeryToken]
public async Task<ActionResult> Login(LoginViewModel model)
{
    if (ModelState.IsValid)
    {
        var user = await UserManager.FindAsync(model.UserName, model.Password);
        if (user != null)
        {
           await SignInAsync(user, model.RememberMe);
           //IsAuthenticated is returns false 
           bool isAuthenticated= User.Identity.IsAuthenticated;
            return PartialView("_LoginPartial");
        }
        else
        {
            ModelState.AddModelError("", "Invalid username or password.");
        }
    }

    // If we got this far, something failed, redisplay form
    return View(model);
}

after the SignInAsync method is invoked ,the User.Identity.IsAuthenticated is returns false why thats happening?
Would appreciate any help offered. Let me know if you need any other information to help answer this question

A:

This because the asp.net pipeline has not authenticated the user.
The User.Identity.IsAuthenticated value is based on HttpContext.Current. What should happen is SignInAsyncwill add a cookie that the framework will use to authenticate future requests.
So after this Controller action has been hit. User.Identity.IsAuthenticated will be true in all controller actions. The AuthorizeAttribute is based on this. 
To get the username i would look at the user property that UserManager.FindAsync has returned i.e. 
var userName = user.UserName

