Added template, better read me, added loginwindow condition