public function unauthorized()
    {
        $this->loadModel('User.Users');
        if ($this->request->is('post')) {
            $user = $this->Auth->identify();
            if ($user) {
                $this->Auth->setUser($user);

                return $this->redirect($this->Auth->redirectUrl());
            } else {
                $this->Flash->danger(__d('user', 'Username or password is incorrect'));
            }
        }
    }