made logout button functional