Refactoring, Authentication, Middleware