magento 1.9 – How to access the details of a registered user

Our Company wishes to have some web pages outside of Magento (1.9) but on the same web server and control access to those pages according to the credentials of a person who logged in to Magento.

Initially, we would like a page that is only visible to people who have logged in and belong to a specific group of customers.

After that, we would like to be able to control what features appear on a web page according to the person who started the session.

In our previous site of no electronic commerce, the above was achieved through PHP pages that
1. I used the phpBB login information
2. comparison of the identification of the person who started the session with the authorities registered in a mySQL database.

So I am happy to write fairly simple things in php and sql (procedural approach instead of object oriented) but I am not aware of the internal workings of Magento.

Regards,
Andrew Nummelin
Webmaster HMRS