I created a middleware to give page access base on role.
I have three middleware
checklogin.js
export default function ({