public static User getUserByUsername(String username, ArrayList<User> users) {
		// search for user from array of users
		for (User u : users) {
			if (u.getUsername().equalsIgnoreCase(username)) {
				return u;
			}
		}
		return null;
	}