Listening for Online/offline events + CSS changes