Adds withCredentials option.