fixing reload infinty vite bug and log in