Group can be different from User

App user and app group are not necessarily the same.

-> added a new $app_group variable instead of using $app_user for groups.