added register and login