Added authentication and logging