Login and logout button according to state and added token cache