update auth function, remove last update line