When I press the EXIT button in the menu transaction, GuiXT starts VK12 transaction, instead of showing me the logoff pop-up window. What could be the reason?

It is very likely that for this popup you created a script 

(SAPLSPO1.E0100) that performs an "Enter". You need to put an

"if... endif " around it.