public void processConnection() {
		try {
			int messageCode = (Integer) input.readObject();
			
			switch(messageCode) {
			case LOGIN_SUCCESSFUL:
				isLoggedIn = true;
				
				proceed.lock();
				loginCompleted.signal();
				proceed.unlock();
				break;
			case LOGIN_FAILED:
				loggingUI.displayErrorMessage("Username or password is incorrect");
				break;
			case SIGNUP_SUCCESSFUL:
				loggingUI.displayInfoMessage("Sign up successful. Please log in.");
				break;
			case SIGNUP_FAILED:
				loggingUI.displayErrorMessage("Username already exists.");
				break;
			}
		}
		catch (Exception exception) {
			JOptionPane.showMessageDialog(null, "Cannot connect to the server. Please check your internet connection",
					"Connection Error", JOptionPane.ERROR_MESSAGE);
		}
	}