Okay, turns out you can't just monkey-patch Devise's class in any straightforward way. So you have to create your own SessionsController class that inherits from Devise's, and then tell Devise where to find it in your routes.