code: protected function initRoutes(Application $app, $module)
      {
          $config = [
              'class' => GroupUrlRule::class,
              'rules' => $module->routes,
          ];
  
          $rule = Yii::createObject($config);
          $app->getUrlManager()->addRules([$rule], false);
  
          Yii::$app->user->loginUrl = $module->loginUrl;
      }
docs: Init routes
  @param Application $app
  @param Module $module
  @throws InvalidConfigException