Put the logout call in the right place

We were calling logout but it was not hooked up to the delete session