added code to log user actions on the view pages