sqlite & session handling