logout now happens without a page refresh