Added online/offline mode events