add userID into history table