Authentication controller bug fix