added the logoutUrl optional option