public function authenticated()
    {
        $user = $this->Auth->identify();
        if ($user) {
            $this->Auth->setUser($user);

            $this->dispatchEvent('HybridAuth.login', ['user' => $user]);

            return $this->redirect($this->Auth->redirectUrl());
        }

        return $this->redirect($this->Auth->config('loginAction'));
    }