private void handle_registration(final String input, final Client client) {
		final LoginData ld = getLoginData(client);
		
		debug("state: " + ld.state);
		debug("input: " + input);
		
		if ( ld.state.equals(Constants.USERNAME) ) {
			ld.username = input;
			ld.state = Constants.PASSWORD;
			
			op_registration(client);
		}
		else if ( ld.state.equals(Constants.PASSWORD) ) {
			ld.password = input;
			ld.state = Constants.REGISTER;
			
			op_registration(client);
		}

		else if ( ld.state.equals(Constants.REGISTER) ) {
			if( Utils.mkList("y", "Y", "yes", "Yes", "YES").contains(input) ) {
				final String username = ld.username;
				final String password = ld.password;

				acctMgr.addAccount(username, password, 3);

				final Account account = acctMgr.getAccount(username, password);

				caTable.put(client, account);
				
				// TODO this seems a tad insecure
				send("Account Registered!", client);
				send("Username: \'" + username + "\'", client);
				send("Password: \'" + password + "\'", client);

				send("You may now login using your account credentials as you would those for an ordinary player.", client);
			}
			else {
				send("Registration Aborted!");
			}
			
			// exit registration regardless
			setClientState(client, "");
			setLoginData(client, null);
		}
	}