first you have to console req.headers in your protecroute function
then const token = req.headers.cookie.split("=")[1];