added socket as way for client to send to server when connection available, AJAX calls temporaryly commented out