refactor Auth.check()