Client-side router implementation