DRY: refactor out the Authorization header

Signed-off-by: Tomas Neme <lacrymology@gmail.com>