added logout button functionality