improve handling of :use_ssl flag (closes #1)