added jwt middleware func