add login history table and logic