Clean up authentication logic.