added js-generator; added logout functionality