- Moved `w.reloadCallback(cfg)` invocation to occur before `refreshAuthState()` for proper configuration updates.