fix #1796 signout lag

fix #1796 signout lag
Minor point, but should check if mProgressDialog is null here since it's not created if a null context was passed.