fixes #3055
minor cleanup
mock client fix
Merge pull request #3292 from sancar/fix/reuseUuidOnReconnect/master

Client uuid generation and registration fixed