Fleshed out the hub to cloud authentication stuff