Finished server side implementation of the device manager (apart from rooms) and the schedule manager