Added loading spinner when pressing back button