protected void btnLoginSubmit_Click(object sender, EventArgs e) { var identityDbContext = new IdentityDbContext("IdetityConnectionString"); var userStore = new UserStore <IdentityUser>(identityDbContext); var userManager = new userManager <IdentityUser>(userStore); var user = userManager.Find(txtLoginEmail.Text, txtLoginPassword.Text); if (user != null) { //todo: log user in / instruct user to log in LogUserIn(userManager, user); } else { litLoginError.Text = "Invalid username or password."; }