code: function handleLogout(req, res, next) {
  		var p = new Promise(function (resolve, reject) {
  			// Return success even if not currently logged in.
  			if (!req.locals.user) {
  				debug(`Request is not authenticated, nobody to logout.`);
  				return resolve({
  					success: true,
  					message: 'not logged in'
  				});
  			}
  
  			// Lookup current user and do the logout.
  			debug(`Logging out the current authenticated session for User ${req.locals.user}`);
  			AclUser.findOne({
  				_id: req.locals.user._id,
  				local_auth_type: 'password',
  				active: true
  			}, function (err, user) {
  				if (err) {
  					debug(`Error finding User during logout request.`, err);
  					return reject(new restifyErrors.InternalError(err));
  				}
  				if (!user) {
  					debug(`User not found during logout request.`);
  					return resolve({
  						success: true,
  						message: 'not found'
  					});
  				}
  				user.modifiedBy = 'logout';
  				user.last_logout_date = new Date();
  
  				// Destroy the current Bearer token 
  				for (var i = user.bearer.length - 1; i > -1; i--) {
  					if (req.headers.authorization == `Bearer ${user.bearer[i].token}`) {
  						user.bearer.splice(i, 1);
  						break;
  					}
  				}
  
  				// Save the User back to the database
  				user.save(function (err, result) {
  					if (err) {
  						debug(`Error updating user during logout request.`, err);
  						return reject(new restifyErrors.InternalError(err));
  					}
  					resolve({
  						success: true,
  						message: 'success'
  					});
  				});
  			});
  		}).then(function (data) {
  			req.logout(); // Provided by Passport
  			res.json(data);
  			next();
  		}).catch(function (err) {
  			debug(`Error handling logout request.`, err);
  			next(err);
  		});
  	}
docs: handleForceLogout *******************************************************