> Tried this setting only PATH, and it prevented me to log in...
Probably a mistake in your script that causes sh to terminate.