Add register logic

Add validations for login and register