notably i had to change `window.location = foo` to `window.location.assign` so that i could have something to spy on with jest. mocking sucks. Otherwise this is pretty similar to the registerSecurityKey.test.js file.