Create the window's deferred object before running initialize and create
Do not attempt to access response headers when the readyState is 0
The cancel button in LoginWindow rejects the deferred instead of simply closing the window