[ProdApp]: improved algorithm + logout procedure is perfect now