Adds authentication, sig and token gathering, probably like 90 bugs.