Improved compatibility and bugfixes

- used a mysql join to eliminate need for extra column and server code
to send team data with student responses
- fixed bug where wrong lock status would show because the session
variable was updating after the initial lock check