Adding authentication mechanism.