Suthentication controller bug fix