save user to db, password encryption