Added middleware, made req available in view