Centralize auto-determination of port number
[mms] By default, use TLS if available and necessary to login to server.
tweaks