Assuming that you are using a .bat file and not Powershell, you missed the "< nul" part.
That post also commented about what the log looks like if the PC crashes and a logoff event is not written. You will have the same issue. To work around that, you will have use that trick on both logon and logoff scripts.
In the logon script, write a new line first.
@echo.>> D:\Users\USER2\desktop\log-1.csv
set /p =%computername%,%username%,%TIME:~0,5%,%date%,< nul >> D:\Users\USER2\desktop\log-1.csv
The logoff script.
set /p =%TIME:~0,5%,%date%< nul >>D:\Users\USER2\desktop\log-1.csv