Added authentication to the webcommand function