uses error return from ajax to reload page