get login temoplate sorted