The first step realize the register and login dialog