moved profile management functions from jsp files to a servlet