Route Middleware to Check if a User is Authenticated in Node.js