Is it supposed
to shutdown xfce and to log you out?
It does that. You have to be careful with it as it kills "all processes that match the criteria" and the shell is a vital part of Unix-based/-like systems.
Avoid using pkill on system programs, use ps and then kill PID instead.