So it’s not avast which is blocking the computer (avast does not ‘load’ on safe mode) but, on contrary, seems you’re infected with some kind of virus that avoids logging.
I’m not a ‘cleaning’ expert. I need that other users, better than I, help you on this… maybe mauserme, maybe essexboy, maybe Frank, maybe Polonus… Sorry.