Upload avatar functionality

Here is the basic functionality for upload avatar popup.