Hi, model 1717
1. device goes into wi-fi off by itself
2. when away from home it goes into 4G mode, but in the vicinity of my router it does not remember my wi-fi password, and have to enter it again
Welcome to Android Central
1) In your WiFi settings, there should be an option for "WiFi on during sleep" or something along those lines. If that's off, it will cause you to disconnect from the network.
2) Have you tried forgetting the network and reconnecting again?