It was discovered that while logging in through the log in button the user is redirected to https://era.library.ualberta.ca/auth/saml with a 404 if the page is still in the process of being loaded (confirmed through throttling the network in chrome dev tools.) Might be related to turbolinks?