encodeURI on path used in authentication