Adds support for auth. Note: UNTESTED (but will be in a few minutes, so if you see this later, tested)