Added app-level beforeRoute method/check