[network] Implement client online/offline status tracking in database