update register and login