Add url validation for redirect.
Add anonymous  functions as callback for routing.