reworking much of the solution to follow new auth demo style