public function execute() {
        $this->container->set('securityContext', $this->securityContext);

        if (is_null($this->node) || !array_key_exists('authentication', $this->node)) {
            return;
        }
        if (array_key_exists('security', $this->node) && (!$this->node['security'] || $this->node['security'] == 'false')) {
            error_log('security element null or not found in node');
            return;
        }
       
        $token = $this->getToken();
        
        try {

            $this->authenticationManager->authenticate($this->securityContext);
        } catch (\Exception $e) {


            if(array_key_exists('fail_url', $this->node)) {
                header('Location: ' . $this->getSiteURL() . $this->node['fail_url']);
            } else{
                echo json_encode(array('message' => $e->getMessage(), 'code' => $e->getCode()));
            }

            die();
        }

        //this is handled in the UserLoginManager
        //$this->container->set('securityContext', $this->securityContext);
    }