Logon and logoff handlers.