Bug on login - logout