implemented logout and show analytics