Login and register refactored as strategies