In the previous version of the code we only set the Authenticator.setDefault(null) if there was a proxy connection.  SO this should be under the isProxy()