I've found several posts on this site and the internet describing how to log out the current user, but how can I log in a specific user?
Log out (cygwin) can be accomplished this way:
echo "\n" | powershell -ExecutionPolicy RemoteSigned "(gwmi Win32_OperatingSystem).Win32Shutdown(0)"
shutdown -l^_^