Honour application_name and api_key correctly

application_name was not set in ConsoleCommand
api_key was never set (or I didn't find it, how it should work)

This patch should fix that.