Fixed Log out button also triggering Exit.

The Exit button is shown when Log out is pressed.
Originally, it also received the original mouse_click event which
triggered the Log out button, thus also triggering the Exit button.

By moving the logout action inside a separate task, it won't be run
until the next scheduling cycle. Thus, it won't receive the original
mouse_click event.