Don't understand your issue. Your able to upload or select a gallery image, save the profile, see the new avatar, but as soon as you logout the avatar is gone? Please further explain in detail what your issue is. I recommend testing upload of avatar and saving profile with Joomla debug mode on and maximum error reporting set to see if there's a PHP error happening.