Implement UserAuth middleware