Update urlrewrite_redirect.py

not log in = redirect
logged in = not redirect
we need to check the headers once we are logged into to the web site. 

EDIT: it was creating a redirect bug, when no auth was used, because if no auth used there is a redirect. If auth is used no redirect and everything works as it should! Thanks!