register and login workflow