If you are using express 3.x series you are out of luck here. You need to hack the middle ware to to check the the path.
app.use(function(err, req, res, next){
if(canRouteSkipLogin(req.path)
next();
else{
//Do the auth logic
}
});
canRouteSkipLogin = function(path){
//logic to find the path which can skip login
}
While in express 4.0 you can do it much easier way.
var authRoutes = express.Router();
var nonAuthRoutes = express.Router();
authRoutes.use(function(req, res, next) {
//Do Auth Logic here
});
Hope this explains.