added socket code to layout.jade