Update to use newer API

The version of the API being used here isn't very safe.  Its mitm-able so heres some changes that should bring it up to the newer authentication api that uses hmac with a pre-shared key to verify the message integrity.