click here for a lightweight tutorial about creating user membership facilities. You may prefer to make use of a framework, such as CodeIgniter (which I rate as the best, particularly for newbies). If anyone tells you to use .htaccess, it's best avoided.
Regarding file downloads. That's trivial unless you intend to permit user uploads as well. Then it gets serious.