Adding offline support using jstorage