Refactor auth to use options provided by uri parser