added authentication to update profile view, by ensuring that the logged in user can only access their profile