Fixed sessions to let everything else use the database connection