Allowed Uri classes to use a custom session if it's provided

It works and it includes tests :)