add back protect middleware