Add user management command wiring and add user command (fixes #1171)

Also extract common set up logic for command manager tests.