Adds control signal handling
So that the server can properly shutdown.