We need to test this with shibboleth auth as well - I'll do this once merged and submit a pull request to fix this