redirect should go to proper endpoint