private boolean login() {
		Console console = System.console();
		boolean isAuthenticated = false;
		if (console != null) {
			int count = 0;
			do {
				char[] pwd = console.readPassword("[%s]", "Password:");
				isAuthenticated = authenticate(pwd);
				// character array is a primitive array
				// the idea is it can be deterministically cleared from 
				// memory as opposed to a String or other container.
				// Delete password from memory
				Arrays.fill(pwd, ' ');
				console.writer().write("\n");
			} while (!isAuthenticated && ++count < MAX_LOGINS);
		}else if (console == null) {
			System.out.println("Failed to return a console.");
		}
		return isAuthenticated;
	}