CLosing window actions

When a user attempts to close the window the logout conditions
are verified.

Signed-off-by: Martinas Mihaela <martinas.mihaela21@gmail.com>