added logout functioanlity