Added activities filter
Improved extracting token so # is not required in the callback url