Get it working, by splitting 'login' and 'fetch token'. After fetching the token, it should be persisted.
The second response to SSDP after a successful get_token will authenticate/connect you.