Upgrade web/app to express 4.x

 - Add extra dependencies for the middleware used.
 - Fix the usage of `app.locals` API.

/cc @ritch