Implement api key support (rev. 7)

Signed-off-by: nixnodes <code@eth.si>
Minor fixes

Signed-off-by: nixnodes <code@eth.si>