Add frontend event hooks for before and after app is loaded