Defining Authentication API.