The way to go is the following:
app.get('/login', function (req, res) {
//login user
});
For register, something similar
app.get('/register', function (req, res) {
//register user
});
Finally, for everything else, you just do the following:
app.get(/^\/(.*)/, function (req, res) {
//everything else
});
Obviously, you would have to place the first two route definitions before the last one.
For more details, check out Organize routes in Node.js
EDIT: As per your comment, and assuming you will want to handle "many pages" at each of these routes, you can do the following:
app.get('/login/:id', function (req, res) {
//login user with id = id
//The value of id = req.params.id
});
Other than that, to handle any route that starts with '/login/', try this regex:
app.get(/^\/login\/(.*)/, function (req, res) {
//handles route like '/login/wefnwe334'
});