moving the trackUserLocation function and its callbacks to the router