Removed console logs. Replaced authentication condition with checking array values, rather than checking for identical arrays