Adding fix for async login/signup issues. API change.