! Improve handling of login history (fixes #2290)

Signed-off-by: Michael Eshom <oldiesmann@oldiesmann.us>