Migrated first method with authentication and logging. Remaining methods should now be easy.