Add SASL PLAIN authentication and authorization.

Comes in handy if admins want to migrate accounts. Comments and corrections welcome.