public static void main(String[] args) {

		printWelcome();

		// Attempting authentication with server
		try {
			sock = new ServerConnection().getNewConnection();
			new LoginHandler().handleIt(sock, currentUser);

		} catch (Exception e) {
			e.printStackTrace();
		}

		System.out.println("Type \'h\' for a list of commands");

		// This loop is infinite, until the user enters a valid command,
		// which is then dispatched to the controller.
		while (true) {
			
			if(sock.isClosed()) {
				sock = new ServerConnection().getNewConnection();
			}
			
			if(!currentUser.isLoggedIn()) {
				new LoginHandler().handleIt(sock, currentUser);
			}
			
			Scanner inputReader = new Scanner(System.in);
			showPrompt();

			String userInput = inputReader.next();

			if (isValidCommand(userInput)) {
				try {
					controller.execute(userInput, sock, currentUser);
				} catch (Exception e) {
					e.printStackTrace();
				}
			} else {
				System.out.println("Illogical Command.  Please try again.");
			}
		}
	}