Isn't there anything already built?
Of course, there is. In fact there are various libraries out there ready to be used, for example:
SimpleLoginSecure is very easy to use, and is the one we are going to see in this example. First download it from the Wiki, unzip it, and copy the unzipped contents to the
application/libraries folder. We need to do just one more thing in order to use the library, we need to create this table:
CREATE TABLE `users` ( `user_id` int(10) unsigned NOT NULL auto_increment, `user_email` varchar(255) NOT NULL default '', `user_pass` varchar(60) NOT NULL default '', `user_date` datetime NOT NULL default '0000-00- ...