Code to handle anonymous user activities + multiple bug fixes