made oauth success redirect more flexible