Several fixes:

The button for logIn was being hided when the user was not logged in; 
The token was being deleted and the contable updated even when the user was not valid;

keyToken package must be updated