Fix mongoengine session attribute error