Pass err to authenticate