added two settings switches for plain text and require TLS