added admin check middleware function