Rewrite clustohttp to have more encapsulation, take auth as an argument