added error handling to createUser of UserService