implemented logout, TODO: make logout just redirect to /home in the view