handle rejected URIs better
addeding check and client tests