fix regression

fire 'logout' event and set loggedIn to 'false' explicitly as it was
done before whenever session is closed