Added logic for switching between active tabs in the main content area, in the dashboard of course.