Simplify checkAuth logic by only use path.