title: socket.emit not working client side or server side not getting
body: <p>So I am coding an online idle game using socket.io and node.js(first time) that saves your progress via a login and arrays on the server side. And when I have the client socket.emit the credentials the user entered it should be sent to the server. My function in the client side is completing(I have a console.log at the end) but i'm not sure if the server isn't receiving it or if the client isn't sending it. I couldn't find any articles with fixes that worked for me. I don't get any errors when I run it. here are some snippets of my code:</p>
  
  <pre><code>//client
  var username = 'example'
  var password = 'example'
  socket.emit('login', username, password);
  console.log('data succesfully sent')
  </code></pre>
  
  <p>server:</p>
  
  <pre><code>var io = require('socket.io')(http);
  
  
  io.on('connection', function(socket) {
  console.log('new user connected')
  io.sockets.emit('welcome', 'Someone new connected')
  
  
  
    io.on('login', function(username, password) {
    console.log('login attempted')
  //...
    )}
  </code></pre>