I've asked this before and am needing help on one last page!!

I have a members signup page where they sign up and have a user level of 0. I have to have a page which I can inlude on any page which will confirm they have logged in and if not kick them out of the login page and if they have then confirm if they are a user or admin... if a admin page then say you don't have the permissions!!

I have a sign up page done just want a auth.php page to do the above