added logout func