finish register and login model