public Profile getProfile(String id) {
		System.out.println("MineshafterProfileClient.getProfile(" + id + ")");
		URL u;
		try {
			u = new URL(API_URL + "?uuid=" + id);

			HttpURLConnection conn = (HttpURLConnection) u.openConnection();

			InputStream in = conn.getInputStream();
			String profileJSON = Streams.toString(in);
			Streams.close(in);

			System.out.println("MS.getProfile: " + profileJSON);

			if (profileJSON == null || profileJSON.length() == 0) { return null; }

			JsonObject pj = JsonObject.readFrom(profileJSON);

			// TODO: md5 the username/email
			// server will return a profile for the email if there is one
			// then it will
			Profile p = new Profile(id);
			p.setName(pj.get("username").asString());
			JsonValue skinVal = pj.get("skin");
			JsonValue capeVal = pj.get("cape");
			String url;

			if (skinVal != null && !skinVal.isNull()) {
				url = textureHandler.addSkin(id, skinVal.asString());
				p.setSkin(url);
			}
			if (capeVal != null && !capeVal.isNull()) {
				url = textureHandler.addCape(id, capeVal.asString());
				p.setCape(url);
			}

			return p;
		} catch (IOException e) {
			e.printStackTrace();
		}

		return null;
	}