Cleaned up state upon logout/fresh login.

This will prevent some weird cases from occurring where courses,
buildings and sessions could be duplicated.