Changed avatar function in UserController