correctly handles success or failure of user insertion