are you talking about setting a cookie on the user side that will automatically "remember them" when they visit your site again so they dont' have to log in?
It's not a function, you just set the cookie and if the cookie is valid (time-period and values) then they're logged in, if not, then you need to get them to log in again.
~Brett