LB-1329: Avatar can't be set for the user

Rolled back to the master version because the current angular.js
refactored version is incomplete