Fixes crash when user cancels the async login dialog.