Menu bar - display Logout issue

Hi, I don’t know why my app is having this logout problem. The display supposed to show “logout” in the menu bar, but it shown “login”… and error message displayed. How can I fix this problem?

Codes:

Error: