title: How to remove a cookie on logout button?
body: <p>I am having a hard time removing a cookie when the logout button is clicked. I currently have a logout button with the class logout. and this is the simple jquery line I am trying to put to remove the cookie but it is not working.</p>
  
  <pre><code>$('button .logout').click(function () {
              $.cookie('userid', null);
         };
  </code></pre>
  
  <p>userid is the name of the cookie.</p>
  
  <p>Oh I am using a signed cookie, not sure if that changes anything?</p>
  
  <p>EDIT:</p>
  
  <p>Here is how I set the cookie:</p>
  
  <pre><code>exports.loginPost = function(req, res, next) {
      console.log("here 1");
      passport.authenticate('local', function(err, user, info) {
          if (err) { return next(err) }
          if (!user) { 
              return res.render('loginError', {title: 'Weblio'}); }
          req.logIn(user, function(err) {
              if (err) { return next(err); }
              console.log(JSON.stringify(user));
              res.cookie('userid', user._id, { maxAge: 900000, signed: true });
              res.redirect('userProfile');
          });
    })(req, res, next);
  };
  </code></pre>
  
  <p>And using a simple express - node js cookieParser with a secret in it.</p>