changes to use base64 and urllib2 as jython client does not support requests module