Added auto start functionality

This fixes issue #8 

Maybe @de-code can look at the overall changes and especially the Windows specific changes if it looks good.