// routes/users.js
const express = require("express");
const router = express.Router();
const path = require("path");
const fs = require("fs");

router.get('/', (req, res) => {
	if (req.session && req.session.authenticated) {
		req.session.destroy(err => {
			if (err) {
				return res.redirect('/');
			}
			res.redirect('/login');
		})
	} else {
		res.redirect('/login');
	}
});

module.exports = router;
