adding user online and offline mode