I feel myself quite incompetent so solve Mozilla and/or Thunderbird problems with avast. At least, if you uninstall AVG and then install avast! it must work without problem. Anyway, can you confirm:

  1. you checked the option ‘save password’ into email accounts
  2. you checked the option ‘save password’ into smtp authentication
  3. you checked the right option to the Internet connection (Internet Settings of the browser)
  4. your avast! configurations (Update (Advanced) options) define correctly the way you connect the Internet (dial-up or DSL)