Refactored UserConnection by moving to this file from User.js.