Android, control does not come back to the callback implemented when webview is involved to get the response from server

Appium - 1.4.0.0

My test case involves authentication with valid credentials and then logout. If authn & logout is successful, my test case passes.
Things work fine manually with same set of code. But when using appium following happens:

  1. authentication is successful
  2. if logout url is valid, the control does not come back to the implemented callback. Somehow appium is not able to capture it – which is an issue
  3. If logout url is invalid, appium captures the callback and control comes back to the implemented callback.

It will be great if someone can help on this.