title: authenticate user using devise in custom controller
body: <p>I'm using rails 3 and devise and I would like to have a SecurityController where I call methods like sign_in_user or reset_password which will be a post passing in parameters like username and password to it.</p>
  
  <p>I know I could use before_filter :authenticate_user! but I would like to authenticate myself. If the authentication is successful then I would like for that user to sign_in.  </p>
  
  <p>Reason I do this is because I have an iphone app which depends on authenticating to the web app to use the app.</p>