elements whose properties are already set to hidden shows for a split second before my page redirectsto another page. how do I fix this?