Router swap implemented on login, but still duplicating