Use current session for building resource requests, close #2065