Coding authorization logic in UI components