Add Online/Offline Detection