fixed a bug in the authhandler
fixed another bug in the authhandler