handle tls errors
persist usermgmt info
Merge branch 'err_handling_write_trust_cert_1'