fix bug with onSocialLogin function