public void handleLogin(String loginData) throws IOException {
		Logger.writeInfo("New user connecting...");

		Logger.writeInfo("Parsing userdata...");

		String[] loginDataArray = loginData.split("::");

		if (loginDataArray.length < 3) {
			// ##LOGIN:address:username
			Logger.writeError("Recieved unreadable userdata string.");
			for (int i = 0; i < loginDataArray.length; i++) {
				Logger.writeInfo(loginDataArray[i]);

				// Experimental "safe" printing of a stack trace.
				// Will not cause a crash.
				Exception e = new InvalidPacketException("");
				e.printStackTrace();
			}
			return;
		}

		InetAddress address;
		try {
			address = InetAddress.getByName(loginDataArray[1]);
		} catch (UnknownHostException e) {
			Logger.writeError("Error while retrieving address for new user...");
			Logger.writeError(e.getMessage());
			return;
		}
		String username = loginDataArray[2];

		Logger.writeInfo("Parse successfull!");

		if (bh.isUserBanned(address)) {
			rs.rejectConnection(address, "User Banned!");
			return;
		}
		SendHelper sh = new SendHelper();
		User userID = new User(username, address);
		for (int i = 0; i < ServerMain.uh.users.size(); i++) {
			if (ServerMain.uh.users.get(i).nick.equalsIgnoreCase(username)) {
				Logger.writeInfo("Accepting previous connection...");
				if (ServerMain.uh.users.get(i).password != ""
						&& !address.equals(ServerMain.uh.users.get(i).address)) {
					ServerMain.uh.users.get(i).address = address;
					ServerMain.uh.users.get(i).requireAuth = true;
					rs.acceptConnection(address);
					sh.sendMessageToUser(username,
							"Authentication Failed, please authenticate!", true);
					ServerMain.EVENT_BUS
					.post(new LoginEvent(username, address));
					return;
				} else {
					rs.acceptConnection(address);
					ServerMain.uh.setOnline(username);
					sh.sendMessageToAllUsers("[Server]", username
							+ " has connected!");
					if (ServerMain.uh.users.get(i).password == "") {
						sh.sendMessageToUser(
								username,
								"Please create a password using '/pass new <your password>'",
								false);

					}
					ServerMain.EVENT_BUS
					.post(new LoginEvent(username, address));
					return;
				}
			}
		}

		ServerMain.uh.addUser(userID);
		rs.acceptConnection(address);

		sh.sendMessageToAllUsers("[Server]", username + " has connected!");

	}