rework to use cas_url and not hostname nope still needs hostname