added authentication, married client-side code with profile page