Create and install a Windows Service to do the actual work. This service will not require a logged on user and by definition only runs with once instance at a time, so this solves all of your problems.
Then let the UI communicate with the service through IPC and let the UI application start upon logon.
You can alternatively of course just let the user autologon, put a shortcut to the program in the startup folder and call the LockWorkStation()
function after your application starts, but I would not take nor recommend that approach as it has security issues.