private void tryLogin(String name, String password)
		{
			String errorMsg = "";
			int result = server.login(name, password);

			if (result < 0)
			{
				if (result == -1)
					errorMsg = "User unknown";
				else if (result == -2)
					errorMsg = "Invalid password";
				else if (result == -3)
					errorMsg = "User already logged in";
				else
					errorMsg = "Unknown error code";

				JOptionPane.showMessageDialog(thisWindow, errorMsg,
						"Login failed", JOptionPane.ERROR_MESSAGE);
			}
		}