Print a log message (or something other later) when a user is connected. Same thing when the user is disconnected. The xmpp presence can be useful for this task.