added errMsg param to auth task