added logout functions