Assuming you already have the computer setup with a password and autologin what you need is to lock it. So set a scheduled task to run a couple minutes after startup to run a batch file. The batch file runs a visual basic script.
Start cscript LockComputer.vbs
This vbs script will lock the computer.
Set objShell = CreateObject("Wscript.Shell")
objShell.Run "%windir%\System32\rundll32.exe user32.dll,LockWorkStation"
I haven't tested this but theoretically as long as you started the miner program first then it should still run on the locked workstation.