refactor: Extracted authorization object from login and register controllers