add register and login api