For login/logout you need ES background plugin to detect the action, but ES can’t show anything, so you have to send a message to SC background plugin that is able to show Toast (or other).
Be carefully, if no SC are logged the message will be lost
Smart Client HotSpot sample (this sample might be a little bit advanced more than you expect because the sample will use the currently selected camera id by inserting it in a floating window with two camera view items. But let me introduce it to you as a reference) -