public int authorize(String user, String pass){
		// go through all users, look for username
		User currentUser = null;
		for (User u : users){
			if (u.username.equals(user)){
				currentUser = u;
				break;
			}
		}
		
		// return 0 = invalid username
		if (currentUser == null)
			return 0;
		
		// determine type of users
		if (currentUser.password.equals(pass)){
			// return 2 = student 
			if (currentUser.isStudent)
				return 2;
			else // return 3 = teacher
				return 3;			
		} else	// return 1 = incorrect password
			return 1;
		
	}