User model made with password validation