updated session to database