Added functional tests for logging out.