add offline storage and auto connection