Implemented !ClientFactory and username / password management (#1187)