Bugfix: do not mask the user/pass in private config

Bug fix + unit tests.