added register and auth