Added WS and tweaked to validate
Added testing for clientId