Add logout function and replace menu accordingly