Fix model authentication for Rails < 4