If form-based authentication is a bad fit for your application, you might consider using good old HTTP authentication. It’s really easy too. The Teenage Mutant Ninja Hero Coders shows you how in Doing HTTP-Auth with Ruby on Rails.