Run history when logout