improvements to logout endpoint