refine failure vs logout