added logout method