updated router code

still doesnt want to work, all it should be doing is acting like an
intermediate between the client and server