added login logout based functions