Added redirect and reload functionality