new CreateUser command and more refactoring