readdir to models, register val to controller

Also changed some name functions,  and now working on passwoed hashing
.