# Authentification and two controllers

**URL:** <https://www.ruby-forum.com/t/authentification-and-two-controllers/120672>\
**Category:** Rails\
**Created:** [November 19, 2007, 6:05pm UTC](https://www.ruby-forum.com/t/authentification-and-two-controllers/120672 "2007-11-19T18:05:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![KJF](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/59ef9b/32.png) [@KJF](https://www.ruby-forum.com/u/KJF)\
**Post date:** [November 19, 2007, 6:05pm UTC](https://www.ruby-forum.com/t/authentification-and-two-controllers/120672/1 "2007-11-19T18:05:04Z")

</div>

Hi,

I am using the acts\_as\_authenticated plugin. When installed it creates  
a user model and a account controller which handles signup, login and  
logout which is very nice.  
The problem I’m having is that I want the user to be able to login  
from the main page of my application which is handled by a different  
controller, lets call it the main controller.

Is there an elegant way of using the account controller login logic  
instead without moving it to my main controller. I really would like  
to keep them separate.

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![KJF](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/59ef9b/32.png) [@KJF](https://www.ruby-forum.com/u/KJF)\
**Post date:** [November 19, 2007, 6:43pm UTC](https://www.ruby-forum.com/t/authentification-and-two-controllers/120672/2 "2007-11-19T18:43:46Z")

</div>

i don’t really understand your request, but the only thing you need is  
to target the good action with your login form. and you can have as  
much form as you want in your page.  
or maybe you want to use ‘redirect\_to’ in your main controller to  
redirect action to another one.
