How to write a user account


i've been working with ruby for i while, but im new to rails.

I want to write an application, I'm going to write my first real
application from the scratch, also im looking how to implement a good
user system (login, authentication via mail, authorization
permissions, can anyone give me some goods URLs about that point?