Added a method for stopping the server.