Added code to better handle scope limits.
Cleaned up patient view and highlighted unauthorized sections.