bugfix: wrong handling of REDIRECT_URL