Login enforcement lo properties + LO duplication

Fix template duplication (sql query isn't on an auto-increment table, so return value of 0 ... need to compare against FALSE etc).
Ensure someone is logged in before we allow them to duplicate/remove etc templates via the properties panel.