Added stop method to shutdown the server