fix authentication on iOS