refactor error pages, add js back button