Updated controllers to save password and authenticate user