Move avata upload javascript to user.js