add function authCheck and auth for users login