adds login requirement for user edit and user profile pages