Api key authentication dispatcher

This PR addresses part of #13 .