I would like to suggest you to follow these steps to remove the pop ups and installing Avira anti virus on your computer.
-Download and run Junk ware removal tool and restart the computer-downloads.malwarebytes.org/file/jrt
-Run a malware scan using malware bytes anti malware-https://www.malwarebytes.org/mwb-download/
-Restart the computer
-Reset your browsers For Internet Explorer.
-Open Internet Explorer and click on tools.
-Click on Internet options and click on advanced tab.
-Click on Reset
For Google Chrome first remove the extensions.
-Open Google Chrome
-At the far right, inline with the address bar, click the Menu icon
-Click on settings and at the left side you will see extensions
-Click on extensions and click on delete for all unknown extensions.
-Then click on settings and scroll down to click on show advance settings.
-Scroll down and click on the reset option to reset chrome
For Mozilla Firefox:
-Open Mozilla Firefox
-At the top above the address right click on the grey portion and select menu bar.
-Click on help from and select troubleshoot information.
-Click on refresh Firefox and click on finish
Install ad blocker on all browsers using the link:www.adblockplus.org
-Restart the computer and download the Avira software.
-Click on on screen instructions to finish the installation.
-Follow these steps to activate your Avira product:
- Start the Avira software by double-clicking the Avira icon. Usually, it is located on your desktop
-Click Help → License management
-A new window called Welcome to the license wizard opens.
-Type your activation code into the field "Activation code"
- In the "Result" window you can see that the license validity has been activated (field: "License valid until")
Hope these steps will help you to remove the pop ups and and in installing and activating Avira anti virus product.