refactor get client ID from url
merge