changed bad validation logic
added the error alert box to indicate if server is not working properly