added authentication, married client-side code with profile page

fixes #24 #27