Implemented returnUrl support