updating root_url to detect host instead of hard coded server