flash->addMessage('success', $this->translator->trans('logout.flash.success')); $this->ts->login($this->auth->getIdentity()['user'], $this->auth->getIdentity()['password']); $this->ts->getInstance()->logout(); $this->auth->logout(); $this->session->clear(); return $response->withRedirect('/login'); } }