Cleaner authmiddleware