profile page now queries database