fix logout callback, fix inviteFriends on iOS