Totally confused creating expanded login

I am trying to create a login that not only validates a user but also
sets a couple of variables that limit what the user can do. I got the
user verification working but can not figure out how to save the other
information or how to access it elsewhere.
I need the other information to limit the records the user can access.
For example user 123abc may only look at records marked with a number
that is part of his user record. I also want to retrieve the full name
for the user from the user record for logging and display purposes.
In the language I normally use I could do all of the above in minutes,
but it only works on a CRT and everything is global. With Rails I can’t
figure out what is visible where and how to access it.
Any links to examples or hints on what to do are appreciated.