update in authenticateUser