implement create user and fixed minor bug