implement user register and login interface