add login history code to base