Fixing logout on cross-domain with Api

fix #91