Stored sessions locally on a database