Changed logout fucntion to include use of servlet. Also added username
display to profile page and tidied some code.