added treatments 2 and 3, auto logout