update ios auth logic (fix #1373)
Merge pull request #1374 from jlipps/master

update ios auth logic (fix #1373)