Wrote beginning of code to handle authentication and access privilege