update logoff button to index, recognize primary gateway