implemented auth controller