close database session when done