some changes to make it work without login