modified for heroku
Added socket emits for logging purposes