Restructured main.js; supports ssl
modified scrappy client to use username/password
removed some leftover debugging