setup config before setting user.