function logout(req, res) {
  req.logout();
  req.session.destroy(() => {
    res.clearCookie(process.env.SESSION_COOKIE_NAME);
    res.status(301).redirect(process.env.BASE_URL+'/login');
  });
}

module.exports = {
  logout,
};
