refactor ios authorize logic and use security db for 10.9
Merge pull request #1400 from jlipps/master

refactor ios authorize logic and use security db for 10.9