fixing logout issue