Get location redirect url from jquery ajax statuscode 401

I currently have the below code and need to get the location parameter to redirect to. How do I grab it with the statusCode setup?

Ajax Call

$.ajax({
                url: url,
                data: (def.data ? (def.convertToJson ? JSON.stringify(def.data) : def.data) : ''),
                type: def.type,
                dataType: def.dataType,
                cache: def.cache,
                contentType: def.contentType,
                statusCode: {
 401: function (response) {
                        debugger
                        window.location = GET LOCATION URL FROM RESPONSE
                    }}

Response Parameter

response.getAllResponseHeaders()

‘access-control-allow-headers: Origin, X-Requested-With, Content-Type,
Acceptrnaccess-control-allow-origin: *rncache-control:
privaterncontent-length: 58rncontent-type: text/htmlrndate: Mon,
06 Dec 2021 16:51:23 GMTrnlocation:
https://localhost:44360/store?storeorganizationid=24917#/login?returnurl=https%3a%2f%2flocalhost%3a44360%2fstore%2faccount%3fstoreorganizationid%3d24917%26_%3d1638809474810rnserver:
Microsoft-IIS/10.0rnx-aspnet-version:
4.0.30319rnx-aspnetmvc-version: 5.2rnx-exposure-server: EastUS2rnx-exposure-sport: Basketballrnx-powered-by:
ASP.NETrnx-sourcefiles:
=?UTF-8?B?RjpcTXkgV2Vic1xCYXNrZXRiYWxsVG91cm5hbWVudHNcTmV3UmVnaXN0cmF0aW9uXFdlYnNpdGVzXFRvdXJuYW1lbnRzXHN0b3JlXGFjY291bnQ=?=rnx-ua-compatible:
IE=Edge,chrome=1rn’