Added functional tests for logout.