added profile page, better cookie handling