added authentication controller code (incomplete)