change firebase js loading to async to avoid blocking.