Issue #11 - Add validation to register endpoint

Added validation to register endpoint.