Fixed room availability checking and added (un)locking rooms

-Fixed the SQL query used to check for any available rooms based on a
given date range
-Added a script to mark a room as locked when the user checks for room
availability and it is returned
-Script also unlocks the user's current room when they either check for
a new room or leave the page