Added authentication code