Added functionality  to handle get profile requests