logging out and some js changes [MJ-308, MJ-421]