refactor AuthHelper to return redirect info; redirect in client