tidied up userconnection code
Merge pull request #119 from verneroberts/master

tidied up userconnection code