refactored server side

—> next step, refactore (websocket.php)
—> client_actions.php (make more comfortable)