Implement session storage in DB