added error array in controller
added hasError()
added registerFunction in BaseUser;