finally got create user function working.