Added database transaction in creating a new user.