change ws client to handle errors better and do some cleanup
change ws client to handle errors better and do some cleanup

jab1982/opennsa,jeroenh/OpenNSA,jeroenh/OpenNSA,jab1982/opennsa,NORDUnet/opennsa,NORDUnet/opennsa,jeroenh/OpenNSA,NORDUnet/opennsa