add check on anonymous user; change the logger in setuphandlers