Added loading and error pages