Store the session in the db.