fix a bug in work.py happened when user not login