CORE-4574: added functions to record logins and logouts