Add support for redirect url from server, fall back to default behavior