added authenticate method and tested with new product function, it works