some changes to createUser