modified logout