Converting to PHP; establishing variables; set up cookie usage

This sets up the variables you need for usernames and avatars to display. The username and logout link display with present login cookies, and the avatar variable ```$avatar``` can be used to place the avatar however you'd like.