Add support for tls connections