Use one method for setting online/offline