fix webSocket disconnect/connect issue while logging out and in

Fixes [MLHR-1592](https://malhar.atlassian.net/browse/MLHR-1592)