changed bash to login shell for the run_as_user
modifications to make it work again