protected void processConnection() {
		
		boolean loginSuccessful = false;
		try {
			int messageCode = (Integer) input.readObject();
			String userName = (String) input.readObject();
			String password = (String) input.readObject();
			
			switch(messageCode) {				
			case LOGIN_REQUEST:
				serverGUI.showMessage("Login request found from user " + userName +
						"@" + connection.getInetAddress() + ":" + connection.getPort());
				final int clientID = clientLogger.logIn(userName, password);
				infoProvider = null;
				if(clientID != LOGIN_FAILED) {
					loginSuccessful = true;
					Thread infoThread = new Thread(new Runnable() {
						
						@Override
						public void run() {
							try {
								infoProvider = startInfoProvider(clientID);
							} catch (IOException e) {
								serverGUI.showMessage("Error starting infoprovider");
							}
						}
					});
					infoThread.start();
					sendData(LOGIN_SUCCESSFUL);
					while(infoProvider == null) {};
					ClientHandler newClient = 
							new ClientHandler(this, clientID, connection, output, input, infoProvider);
					threadExecutor.execute(newClient);
					
					clientConnections.put(clientID, newClient);
					sendData(clientID);
					sendData(newClient.getClientName());
				}
				else
					sendData(LOGIN_FAILED);
				break;
			case SIGNUP_REQUEST:
				serverGUI.showMessage("Signup request found from user " + userName +
						"@" + connection.getInetAddress() + ":" + connection.getPort());
				boolean isSuccessful = clientLogger.signUp(userName, password);
				if(isSuccessful)
					sendData(SIGNUP_SUCCESSFUL);
				else
					sendData(SIGNUP_FAILED);
				break;
			}
		}
		catch(ClassNotFoundException classNotFoundException) {
			serverGUI.showMessage("Unknown object type recieved");
		}
		catch(IOException ioException) {
			serverGUI.showMessage("Error with input stream");
		}
		
		if(!loginSuccessful)
			processConnection();
	}