Refactored login and register clientside
Added more validation
Made flow more logic (use callbacks as param)