Implemented a function that runs when the avatarMenu page is loaded
Users can now see their avatar in all the pages
Cleaned up the code and removed unused parts