Add a database session handler for use with websockets