Refactor auth layout