Add event for agentlogoff from CLI (bug #3611)