title: Why does UserManager.FindById() return null if I do not relog?
body: <p>I'm trying to find the user associated with the currently logged on user:</p>
  
  <pre><code>public ActionResult Root(string path)
  {
      var id = User.Identity.GetUserId(); //This works
      var currentUser = manager.FindById(id); //This returns null
  
      return View(db.Folders.ToList()
          .Where(folder =&gt; folder.User.Id == currentUser.Id)
          .Where(folder =&gt; folder.Path == path));
  }
  </code></pre>
  
  <p>This only works if I do not use the indicated part in my seed method. If I do execute this part, manager.FindById() returns null.</p>
  
  <pre><code>    protected override void Seed(ApplicationDbContext context)
      {
          if (context == null)
          {
              throw new ArgumentNullException("context", "Context must not be null.");
          }
  
          const string UserName = "admin@tad.com";
          const string RoleName = "Admin";
  
          var userRole = new IdentityRole { Name = RoleName, Id = Guid.NewGuid().ToString() };
          context.Roles.Add(userRole);
  
          var hasher = new PasswordHasher();
  
          var user = new ApplicationUser
          {
              UserName = UserName,
              PasswordHash = hasher.HashPassword("123456"),
              Email = "admin@tad.com",
              EmailConfirmed = true,
              SecurityStamp = Guid.NewGuid().ToString()
          };
  
          user.Roles.Add(new IdentityUserRole { RoleId = userRole.Id, UserId = user.Id });
  
          context.Users.Add(user);
  
          //If I leave this part out, there are no issues.
          new List&lt;Folder&gt;
          { 
              new Folder{Name = "Test", Path = "", User = user},
              new Folder{Name = "Bla", Path = "Test", User = user},
              new Folder{Name = "Lala", Path = "Test/Bla", User = user}
          }.ForEach(f =&gt; context.Folders.Add(f));
  
          context.SaveChanges();
  
          base.Seed(context);
      }
  </code></pre>
  
  <p><strong>EDIT: Starting to narrow it down. If I relog my user, everything works just fine.</strong> The active user during testing remains logged in from the previous debugging session. </p>