# Custom login page

**URL:** <https://www.ruby-forum.com/t/custom-login-page/158364>\
**Category:** Rails\
**Created:** [January 22, 2009, 2:19pm UTC](https://www.ruby-forum.com/t/custom-login-page/158364 "2009-01-22T14:19:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![alamodey](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/7feea3/32.png) [@alamodey](https://www.ruby-forum.com/u/alamodey)\
**Post date:** [January 22, 2009, 2:19pm UTC](https://www.ruby-forum.com/t/custom-login-page/158364/1 "2009-01-22T14:19:31Z")

</div>

Hi,

I’m new to Rails. I’d like to have a customized login page for each  
user. Just like Twitter how you go to [www.twitter.com/username](http://www.twitter.com/username) and you  
can login from there. How do I do that? Thanks.

---

<div class="post-metadata">

**Author:** ![alamodey](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/7feea3/32.png) [@alamodey](https://www.ruby-forum.com/u/alamodey)\
**Post date:** [January 22, 2009, 2:57pm UTC](https://www.ruby-forum.com/t/custom-login-page/158364/2 "2009-01-22T14:57:00Z")

</div>

alamodey wrote:

> Hi,
> 
> I’m new to Rails. I’d like to have a customized login page for each  
> user. Just like Twitter how you go to [www.twitter.com/username](http://www.twitter.com/username) and you  
> can login from there. How do I do that? Thanks.

I’m not sure exactly how Twitter implemented their login page, but my  
guess is that they are just styling the layout with CSS rules associated  
to the user account.

---

<div class="post-metadata">

**Author:** ![alamodey](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/7feea3/32.png) [@alamodey](https://www.ruby-forum.com/u/alamodey)\
**Post date:** [January 22, 2009, 3:53pm UTC](https://www.ruby-forum.com/t/custom-login-page/158364/3 "2009-01-22T15:53:19Z")

</div>

On Thu, Jan 22, 2009 at 3:57 PM, Robert W. \<  
removed\_email\_address@domain.invalid\> wrote:

> ## to the user account.
> 
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).
> 
> >

If you want to have the username on the url like they have, you can use

map.connect ‘:username’, :controller =\> \<controller\_name\>, :action =\>  
\<action\_name\> and you will access the username via params[:username]  
You will need to have that as one of the last entries in your routes  
file  
and you’ll have to be careful of usernames conflicting with your other  
controller paths

–  
Andrew T.  
[http://ramblingsonrails.com](http://ramblingsonrails.com)  
[http://www.linkedin.com/in/andrewtimberlake](http://www.linkedin.com/in/andrewtimberlake)

“I have never let my schooling interfere with my education” - Mark Twain
