handle authentication in mobile safari