added some extra logging for debugging
reverting to old code, did not fix things after all
Seriously still debugging this, only committing to push to heroku
commented out IP address detecting code, since IP address is not directly available to sockets on heroku (due to x-forwarded-by)