intended to fix duplication of QUERY_STRING in the redirection URL in login_needed function