Extract common part to prepare the user