protected void Login1_LoggingIn1(object sender, LoginCancelEventArgs e) { string username = Login1.UserName; string password = Login1.Password; AppUser appUser = dao.findByUsernameAndPassword(username, password); if (appUser != null) { Session["loggedInAppUser"] = appUser; } }