Moved REGEX replace auth tokens to parse_url function