tweak routes and add before filter to pass tests