protected void LogIn(object sender, EventArgs e) { if (IsValid) { // Validate the user password var username = this.UserName.Text; var password = this.Password.Text; DBUtility dbUtil = new DBUtility(); UserLogin userLogin = new UserLogin(); userLogin = dbUtil.AuthenticateLogin(username, password); if (userLogin.IsLoginValid) { Session["LoginStatus"] = "Log Off " + username; Session["ResearcherId"] = userLogin.ResearcherId; Response.Redirect("/Account/Search"); } } }