Add unit test for multi-user configuration loading

Backport of #9647