fix typos in the authentication check for some functions