do the authentication for the rails 2 app