Changes to support user proxy and user password

I've made some changes to support user proxy and user password. I tried setting the jvm properties but it didn't work. 

I've added and Authenticator and everything is working perfectly now.

I hope you find this useful