log-out logic added