public InputStream getInputStream(String url) throws LoginException, XMLReadException {
		try {
			HttpURLConnection hc = (HttpURLConnection) (new URL(url).openConnection());
			hc.setInstanceFollowRedirects(false);
			hc.setRequestProperty("Cookie", getCookie());
			hc.setRequestProperty("Accept-Encoding", "Gzip");
			int status = hc.getResponseCode();
			if (status == 200) {
				InputStream is = hc.getInputStream();
				String encoding = hc.getHeaderField("Content-Encoding");
				if (encoding != null && encoding.equalsIgnoreCase("Gzip")) {
					is = new GZIPInputStream(is);
				}
				setLastCookie(hc);
				return is;
			} else {
				InputStream is = hc.getErrorStream();
				String message = hc.getResponseMessage();
				XMLReadException e = new XMLReadException(is, status, message);
				is.close();
				throw e;
			}
		} catch (IOException e) {
			throw new XMLReadException(XOIReadExceptionType.IO_ERROR, e);
		}
	}