Adds authentication functionality