You don't have to log in. As a matter of fact, deleting files from a drive is one of the weakest forms of protecting your data on recycled computers.
Instead, you can boot the computer using a free data-destruction tool from a USB or CD, or you can physically remove the hard drive and destroy it. If the drive contains sensitive personal or financial information, physical destruction provides the highest assurance that the data cannot be recovered.
One option is DBAN (Darik's Boot and Nuke). You can burn the program to a CD or put it on a USB drive and then boot the old PC from it. DBAN can overwrite the entire hard drive, erasing the existing data.
Another option is Parted Magic, which includes secure erase tools. Recent versions may require a small fee, but some older free live-CD versions are still available.
You can also use a Linux Live USB, such as Ubuntu or Linux Mint. Boot the old computer from the USB, open a terminal, and use a command such as dd or shred to overwrite the entire hard drive.
If you do not need to reuse the hard drive, physical destruction is another option. Remove the hard drive from the computer and open its metal casing with a screwdriver. Inside are one or more shiny metal platters that contain the stored data.
You can damage the platters by deeply scratching them, bending them, or breaking them. You can also use a heavy hammer to damage the drive or drill several holes through the drive and platters. Just be careful... ;)
If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.
hth
Marcin