static boolean authenticate( String username , String hashString, PassthroughConnection ptc )  {

		try {
			String encodedUsername =  URLEncoder.encode(username, "UTF-8");
			String encodedHashString =  URLEncoder.encode(hashString, "UTF-8");
			String authURLString = new String( "http://www.minecraft.net/game/checkserver.jsp?user=" + encodedUsername + "&serverId=" + encodedHashString);
			if(!Globals.isQuiet()) {
				ptc.printLogMessage("Authing with " + authURLString);
			}
			URL minecraft = new URL(authURLString);
			URLConnection minecraftConnection = minecraft.openConnection();
			BufferedReader in = new BufferedReader(new InputStreamReader(minecraftConnection.getInputStream()));

			String reply = in.readLine();

			if( Globals.isInfo() ) {
				ptc.printLogMessage("Server Response: " + reply );
			}

			in.close();

			if( reply != null && reply.equals("YES")) {

				if(!Globals.isQuiet()) {
					ptc.printLogMessage("Auth successful");
				}
				return true;
			}
		} catch (MalformedURLException mue) {
			ptc.printLogMessage("Auth URL error");
		} catch (IOException ioe) {
			ptc.printLogMessage("Problem connecting to auth server");
		}

		return false;
	}