Split login/logout functions into dedicated authentication service