make session implement closeable so that it can be used in
try-with-resources