logout functionality

made container a class, delete and recreate on logout, clear databases
and preferences