logout fnlity wrking fine