Add TLS connection support

Also update the example config to be safe by default.