fixing so that activity history is updated on login and logout