Refactored user creation (required for #235 and #360)