Using router package, making back button work properly