Added validations and authentication