public Session NewSession(Terminal terminal) { const int MAX_TRIES = 3; // ask the user to login for (int attempts = 0; attempts < MAX_TRIES; attempts++) { try { //prompt for username terminal.Write("Username: "******"Set Password: "******"Password: "******"Welcome! " + security.UserName(userId)); return(new SimpleSession(security, this.filesystem, this.shells, terminal, userId)); } catch (Exception ex) { terminal.WriteLine("Nope!"); } } terminal.WriteLine("Failed login attempts!"); return(null); }