move session to db