remove unneeded beforeRoute code