Save session to database