refactor userconnection class