Adding authentication code.