fixes for logout