URLEncoder.encode(Version.APP_NAME, "utf-8"));
StringRequestEntity stringreq = new StringRequestEntity(f.toString());
String uri = "https://www.google.com/accounts/ClientLogin";
RequestOptions options = client.getDefaultRequestOptions();
options.setContentType("application/x-www-form-urlencoded");
ClientResponse response = client.post(uri, stringreq, options);
InputStream in = response.getInputStream();
ByteArrayOutputStream out = new ByteArrayOutputStream();
int n = -1;
while ((n = in.read()) != -1) { out.write(n); }
out.flush();
response.release();
String auth = new String(out.toByteArray());
return auth.split("\n")[2].replaceAll("Auth=", "auth=");
} catch (Exception e) {}
return null;
}