move create user code to better user::createUser