Replace awful authorization setup with fancy injection.

Pretty cool.