finish the register and login part