Support for flexible domains

A new optional function in the configuration settings will allow to support multiple domains or other translations between the login name and the JID. This solves #34