Reprioritize list of references for base URL

Always look for base_url and then session data before
falling back to auth_service information from the config.
Use base_url method for get_tenant_by_id
Merge pull request #77 from relaxdiego/fix/get_tenant_by_id

Fix/get tenant by