Refactor admin login steps to Before hook