Pull sessionURI computation to the top of the method