Update authenticate to include more headers and change structure