[feature] run beforeEnter middleware