Adding redirect to login required middleware