prevent unauthorized access to profile pages and update pages