code: public function run(){
          if (Yii::$app->user->isGuest) {
              echo $this->render('navbaruser_logout');
          }else{
              echo $this->render('navbaruser_login',array('type'=>$this->type));
          }        
          AdminUiAsset::register($this->getView());        
      }
docs: Renders the widget.