fixing things about agent auth