Login controller from Diary example