JavaScript code now sending data about the user to the server