Created auth API method