Address bug in single sign on

If the client sites SSO url contained the sites name, the app would get stuck
in a redirect loop.  Checking the domain instead of the site name fixes this.