Update application.js

First edit.  How can we access the socket properly in the init function?