handle exception clicking log out, also change to an element check
Merge branch '1.12'