Set logout functionality