add support to allow user choose encrypted connections for security or unencrypted conn for best performance