fix some bugs in mdp client functionality, fetching SAS keys