Alomost finished version with logout built in on recery mainWindow