refactor ios authorize logic and use security db for 10.9