Fixed auth mode and cleaned up a couple of lines of debug code