rework to use cas_url and not hostname