Store session in g instead of using scoped_session.