Changed logout to only perform a local logout.
Added invalidateAPIKey method.