Updated login and logout json scripts.