If you create a proxy for foo.com, your javascript can't get the browser to send the user's cookies for foo.com to your proxy.