Finish password storage and checks, improve userExists function for global usage