finished user register and login.