Work in progress on a improved connection manager.

Centralize connections as well as the authentications.