Add authentication code

Added authentication code