modified base.py with secureproxy thing.