finish authentication. Have issue with test but seems later in the tut the bad code is deleted