added authentication to pin management