public virtual bool Authenticate(string Username, string Password) { try { User u = GetUser(Username); if (u.IsPassword(Password) && u.Active) { SetPrincipal(u); return(true); } else { return(false); } } catch { return(false); } }