Add schools model and entry codes for teachers and pupils; also tidy up methods in User model