Use signer's map_key when contacting sql-api

Includes testcase.
Fixes #188