protected boolean doChoosePlayer() {
        state = WAIT_SPECIFYPLAYER;
        String input;
        String playerChosen = "";
        String playerEntered;
        boolean inputDone = false;
        String password1, password2;

        sendText("\r\n   Player: ");
        // get the player name
        do {
            //input = getCharacterInput(false, false,false);
            input = getBlockedInput(true, 60000, false);
            // If input is null, it's probably a socket error. Disconnect.
            if (input == null)
                return false;
            switch (input.charAt(0)) {
                case 3: // CTRL-C for abort.
                    return false;
                case 13: // Capture enter.
                    inputDone = true;
                    break;
                default: // Backspace and buffering.
                    if (isValidEraseCharacter(input.charAt(0))) {
                        if (playerChosen.length() > 0) {
                            sendText(TrekAnsi.moveBackwards(1, this) + TrekAnsi.deleteCharacters(1, this));
                            playerChosen = playerChosen.substring(0, playerChosen.length() - 1);
                        }
                    } else {
                        sendText(input);
                        playerChosen += input;
                    }
                    break;
            }
        }
        while (!inputDone);

        playerEntered = playerChosen;

        // does the player exist?
        if (dbInt.doesPlayerExist(playerEntered) == 0) {
            TrekLog.logMessage("Invalid player found for " + shipName + ", tried player: " + playerEntered);
            sendText("\r\nNew player!  Welcome to JTrek!\r\n");

            do {
                do {
                    buffer = "";

                    sendText("New Password: ");
                    password1 = getBlockedInput(false, 60000, true);

                    if (password1 == null)
                        return false;
                    else if (password1.equals(""))
                        sendText("\r\nPassword cannot be blank!\r\n");
                    else
                        break;
                } while (true);

                do {
                    buffer = "";

                    sendText("\r\nRe-enter password: ");
                    password2 = getBlockedInput(false, 60000, true);

                    if (password2 == null)
                        return false;
                    else if (password2.equals(""))
                        sendText("\r\nPasswords do not match!\r\n");
                    else
                        break;
                } while (true);

                if (!password1.equals(password2))
                    sendText("\r\nPasswords do not match!\r\n");
                else
                    break;
            } while (true);

            // Password matched, so create the player account here.
            boolean result = dbInt.saveNewPlayer(playerEntered, password1);
            TrekLog.logMessage("Create Player Result: " + result);

            buffer = "";
        } else {
            // verify the player password
            String passwordEntered;
            String passwordChosen = "";
            inputDone = false;
            sendText("\r\n Password: ");
            // get the password
            do {
                input = getBlockedInput(true, 60000, false);
                // If input is null, it's probably a socket error. Disconnect.
                if (input == null)
                    return false;
                switch (input.charAt(0)) {
                    case 3: // CTRL-C to abort.
                        return false;
                    case 13: // Capture enter.
                        inputDone = true;
                        break;
                    default: // Backspace and buffering.
                        if (isValidEraseCharacter(input.charAt(0))) {
                            if (passwordChosen.length() > 0) {
                                passwordChosen = passwordChosen.substring(0, passwordChosen.length() - 1);
                            }
                        } else {
                            passwordChosen += input;
                        }
                        break;
                }
            }
            while (!inputDone);
            passwordEntered = passwordChosen;
            if (!dbInt.doesPlayerPasswordMatch(playerEntered, passwordEntered)) {
                TrekLog.logMessage("Invalid password attempt creating " + shipName + " with player " + playerEntered + "!");
                sendText("\r\nWrong password.\r\n");
                return false;
            }
        }

        dbPlayerID = dbInt.doesPlayerExist(playerEntered);

        state = WAIT_SHIPCHOICE;
        return true;
    }