Add client authorize function