Auth bugfix

FIxes a few small bugs.