adding the loading spinner on route navigation