If you need to log in then click on the ease of access icon bottom left and bring up the on-screen keyboard. That will allow you to input the password.
On the desktop put pointer to right corner for the charms bar. Select PC Settings. Once in PC Settings select update and recovery, then recovery. Under Advanced Start-up select restart now. Once the window is up select troubleshoot then system restore. Now hopefully as you're in the advanced set-up you'll gain back the use of the keyboard as you will have to input your password again to start system restore to before you installed Avast.
If you still can't input anything via keyboard you will have to set up a non Microsoft admin account with no password. You can still get the on-screen keyboard via the ease of access in control panel.