Refactor user creation