Fix issue where connections were given the wrong user type
Fix issue where connections were given the wrong user type

I also made it so that primary connections will override secondary connections which will override tertiary connections (to avoid duplicates).

cstavitsky/brumbiki,cstavitsky/brumbiki,cstavitsky/brumbiki