Here is the very simple demo for getting user's data from database and login system. I hope you will enjoy the code and comments :)
Just get it step by step, Do not hurry
.htaccess code: (Place inside your CodeIgniter project)
<IfModule mod_rewrite.c>
# Make sure directory listing is disabled
Options +FollowSymLinks -Indexes