Added logout and cache support