windows azure active directory ionic reach to callback

After sucessfully login with Windows Azure Active Directory, how I can get into my successful callback method?

Azureservice.login('aad').then(function() {
  // How I can reach here
}, function(err) {
  alert(0);
 // This part reaches after I close the pop-up browser window.
});

Using this repo for login via Windows Azure Active directory