Add optional cookie authentication to .auth() method