Access to a website only when I grant them access
===

I have made a registration form and a login form using PHP.The registration form saves user's information to a database.

But as I am pretty new to PHP I want to achieve this think. I have also made a whole template/theme of an e-commerce website but I want as an entrance page to be this registration form and when I grant them access to be able to see the whole content of my e-commerce website.While i say grant them access when they give me the fields of the registration form,they wont be able to enter the website until I send them a password.So my question is how can i achieve not be able to see the entire website?What I need to do to protect it? i mean I need to add code on the registration form? on the login form or the template/theme?

Thanks!