finally canwork with events, yay - see main.js!
Login button in main tray, app 'login' and 'logout' events