Authorization client and server for tidepool