add method upload avatar for user
fixed other bugs