I've just created a program Where you have to insert your name if you want to use the computer and where you can logoff if you want to stop,

To log you in you have to run the application, so you can actually ignore it,

Is there a certain way that makes my program autostart if it isn't in use?

If you log on or log off, a string is written to a log file:
"\n#LOGIN*name:*" + name + "*date&time*" + curdate + "#"
(or LOGOUT)

PS: I'm new to java, so it is possible that I'm asking to much and it is to complicated to explain to a newbie :)