adding redirection and update database on email validation and removed main.js from literally every page