More login development

Altered the header to link to the log in page. Index now correctly
checks the session variables to see if a user is logged in, and which
page they should be forwarded onto.
Authenticate sets session variables correctly, and the sql class gains
a new method to determine a user's type.