The automation query function block can periodically check for the history of all login attempts and email a connection activity report.