Use addEventListener on DOMElement and stopped using NSTimer
Add NSStatusItem to show connection status