added firebase with offline fallback