public function login() { $this->setTokenFromCookies(); if (!empty($this->csrfToken)) { $this->loggedIn = true; } }