MDL-27684 repository: make require_login() throws exception instead of redirect