fixed login logout issue